home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1991 …esperately Seeking Seven / Desperately Seeking Seven.2mg / Dev.CD.8 / Essentials / Tools / File.Type.Notes / FTN.19.XXXX < prev    next >
Encoding:
Text File  |  1990-07-23  |  22.5 KB  |  438 lines  |  [04] ASCII Text (0x0000)

  1. Apple II
  2. File Type Notes
  3. _____________________________________________________________________________
  4.                                                   Developer Technical Support
  5.  
  6. File Type:         $19 (25)
  7. Auxiliary Type:    All
  8.  
  9. Full Name:     AppleWorks Data Base File
  10. Short Name:    AppleWorks DB File
  11.  
  12. Revised by:    Matt Deatherage & John Kinder, Claris Corporation    July 1990
  13. Written by:    Bob Lissner    February 1984
  14.  
  15. Files of this type and auxiliary type contain an AppleWorks(R) Data Base file.
  16. Changes since September 1989:  Corrected the description of offset +337 in the 
  17. header.
  18. _____________________________________________________________________________
  19.  
  20. Files of type $19 and any auxiliary type contain an AppleWorks Data Base file.  
  21. AppleWorks is published by Claris.  Claris also has additional information on 
  22. AppleWorks files SEG.PR and SEG.ER.  For information on AppleWorks, contact 
  23. Claris at:
  24.  
  25.                     Claris Corporation
  26.                     5201 Patrick Henry Drive
  27.                     P.O. Box 58168
  28.                     Santa Clara, CA 95052-8168
  29.  
  30.                     Technical Support
  31.                     Telephone:  (408) 727-9054
  32.                     AppleLink:  Claris.Tech
  33.  
  34.                     Customer Relations
  35.                     Telephone:  (408) 727-8227
  36.                     AppleLink:  Claris.CR
  37.  
  38. AppleWorks was created by Bob Lissner.  AppleWorks 2.1 was done by Bob Lissner 
  39. and John Kinder of Claris.  AppleWorks 3.0 was done by Randy Brandt, Alan Bird 
  40. and Rob Renstrom of Beagle Bros Software with John Kinder of Claris.
  41.  
  42.  
  43. Definitions
  44.  
  45. The following definitions apply to AppleWorks files in addition to those 
  46. defined for all Apple II file types:
  47.  
  48.     MRL   Data base multiple record layout
  49.     SRL   Data base single record layout
  50.     RAC   Review/Add/Change screen
  51.     DB    AppleWorks or /// E-Z Pieces Data Base
  52.     SS    AppleWorks or /// E-Z Pieces Spreadsheet
  53.     WP    AppleWorks or /// E-Z Pieces Word Processor
  54.     AW    AppleWorks or /// E-Z Pieces
  55.  
  56.  
  57. Auxiliary Type Definitions
  58.  
  59. The volume or subdirectory auxiliary type word for this file type is defined 
  60. to control uppercase and lowercase display of filenames.  The highest bit of 
  61. the least significant byte corresponds to the first character of the filename, 
  62. the next highest bit of the least significant byte corresponds to the second 
  63. character, etc., through the second bit of the most significant byte, which 
  64. corresponds to the fifteenth character of the filename.
  65.  
  66. AppleWorks performs the following steps when it saves a file to disk:
  67.  
  68.   1.  Zeros all 16 bits of the auxiliary type word.
  69.   2.  Examines the filename for lowercase letters.  If one is found, it 
  70.       changes the corresponding bit in the auxiliary type word to 1 and 
  71.       changes the letter to uppercase.
  72.   3.  Examines the filename for spaces.  If one is found, it changes the 
  73.       corresponding bit in the auxiliary type word to 1 and changes the 
  74.       space to a period.
  75.  
  76. When files are read from disk, the filename and auxiliary type information 
  77. from the directory file entry are used to determine which characters should be 
  78. lowercase and which periods should be displayed as spaces.  If you use the 
  79. auxiliary type bytes for a different purpose, AppleWorks will still display 
  80. the filenames, but the wrong letters are likely lowercase.
  81.  
  82.  
  83. File Version Changes
  84.  
  85. Certain features present in AppleWorks 3.0 files are not backward-compatible 
  86. to 2.1 and earlier versions.  Such features are noted in the text.  AppleWorks 
  87. Data Base files which may not be loaded by versions prior to 3.0 are 
  88. identified by a non-zero byte at location +218, referred to as location 
  89. DBMinVers.
  90.  
  91. Those features added for AppleWorks 2.0, 2.1 and 3.0 not previously documented 
  92. are indicated with that version number in the margin.
  93.  
  94.  
  95. Data Base Files
  96.  
  97. Data base files start with a variable length header, followed by 600 bytes for 
  98. each report format (if any), the standard values record, then variable length 
  99. information for each record.
  100.  
  101. Header Record
  102.  
  103. The header contains category names, record selection rules, counts, screen 
  104. positioning information, and all other non-record specific information.
  105.  
  106.        +000 to +001    Word    The number of bytes in the remainder 
  107.                                of the header record.  Use this 
  108.                                count for your next ProDOS read from 
  109.                                the disk.
  110.        +002 to +029            Ignore these bytes.
  111.        +030            Byte    Cursor direction when the Return key 
  112.                                is pressed in SRL.  $01: Order in 
  113.                                which you defined categories or $02: 
  114.                                Left to right, top to bottom.
  115.        +031            Byte    What direction should the cursor go 
  116.                                when you press the Return key in the 
  117.                                MRL?  D)own or  R)ight.
  118.        +032 to +033            Ignore these bytes.
  119.        +034            Byte    Style of display that 
  120.                                Review/Add/Change was using when the 
  121.                                file was saved:  R: SRL.  Slash (/): MRL.
  122.        +035            Byte    Number of categories per record.  
  123.                                Values from $01 to $1E.
  124. 3.0    +036 to +037    Word    Number of records in file.
  125.                                If DBMinVers is non-zero, the high 
  126.                                bit of this word may be set.  If it 
  127.                                is, there are more than eight 
  128.                                reports and the remaining 15 bits 
  129.                                contain the true number of records 
  130.                                defined.
  131. 3.0    +038            Byte    Number of reports in a file, maximum 
  132.                                of 8 (20 for 3.0).
  133.        +039 to +041            Ignore these bytes.
  134.        +042 to +071    Bytes    For each of up to 30 columns, 
  135.                                showing the number of spaces used 
  136.                                for this column on the MRL.  Be sure 
  137.                                you understand that categories may 
  138.                                have been rearranged on the MRL.  
  139.                                Byte +042 refers to the leftmost 
  140.                                column on the MRL.
  141.        +072 to +077            Ignore six bytes.
  142.        +078 to +107    Bytes   For up to 30 categories on the MRL, 
  143.                                the defined category that appears in 
  144.                                each position.  Byte +078 is the 
  145.                                leftmost column of the MRL and has a 
  146.                                value from $01 to $1E that defines 
  147.                                which of the category names appears 
  148.                                in this position.  These numbers 
  149.                                change as a result of changing the 
  150.                                layout of the MRL.
  151.        +108 to +113            Ignore six bytes.
  152.        +114 to +143    Bytes   For up to 30 categories on the SRL, 
  153.                                the horizontal screen position.  
  154.                                These are changed as a result of 
  155.                                changing the layout of the SRL.  
  156.                                AppleWorks makes sure that these 
  157.                                entries, and the vertical screen 
  158.                                positions, are kept in order from 
  159.                                left to right within top to bottom.
  160.        +144 to +149            Ignore these six bytes.
  161.        +150 to +179    Bytes   For up to 30 categories on the SRL, 
  162.                                the vertical screen position.
  163.        +180 to +185            Ignore six bytes.
  164.        +186 to +215    Bytes   For up to 30 categories on the SRL, 
  165.                                which of the category names appears 
  166.                                in this position. These change as a 
  167.                                result of changing the SRL.  This 
  168.                                number refers to the category names 
  169.                                listed below.
  170.        +216 to +217            Ignore two bytes.
  171. 3.0    +218            Byte    DBMinVers.  The minimum version of 
  172.                                AppleWorks needed to read this file.  
  173.                                This will be $00 unless there are 
  174.                                more than 8 report formats; it will 
  175.                                then contain the version number 30 
  176.                                ($1E) or greater.
  177. 3.0    +219            Byte    The first frozen column in the titles.
  178. 3.0    +220            Byte    If this is zero, no titles are 
  179.                                present.  If non-zero, this is the 
  180.                                last frozen column.
  181. 3.0    +221            Byte    Leftmost active column.  This is 
  182.                                zero-based; if this value is zero, 
  183.                                it means column one, etc.
  184.        +222            Byte    Number of categories on MRL.  Will 
  185.                                be less than or equal to the number 
  186.                                of categories in the file.  SRL 
  187.                                displays all categories, so there is 
  188.                                no equivalent number for SRL.
  189.        +223 to +224    Word    For the first line of RAC selection 
  190.                                rules.  Zero means no selection 
  191.                                rules, while any other value refers 
  192.                                to the category name that is tested.  
  193.                                The high byte will always be zero.
  194.        +225 to +226    Word    Category name for the second line of 
  195.                                RAC selection rules.  Zero means 
  196.                                that there is only one line.
  197.        +227 to +228    Word    Category name for the third line of 
  198.                                RAC selection rules.  Zero means 
  199.                                that there is no third line.
  200.        +229 to +230    Word    For the first line of RAC rules, 
  201.                                which of the tests is to be applied.  
  202.                                1 means equals, 2 means greater than 
  203.                                and so on.
  204.        +231 to +232    Word    Test for the second line of rules, 
  205.                                if any.
  206.        +233 to +234    Word    Test for the third line, if any.
  207.        +235 to +236    Word    Continuation code for the first 
  208.                                line:  1: And, 2: Or, 3: Through.
  209.        +237 to +238    Word    Continuation code for the second line.
  210.        +239 to +240    Word    Continuation code for the third line.  
  211.                                Not possible, so it is always zero.
  212.        +241 to +272    String  Maximum length of 30 bytes.  
  213.                                Comparison information for the first 
  214.                                line RAC selection rules.
  215.        +273 to +304    String  Comparison for the second line.
  216.        +305 to +336    String  Comparison for the third line.
  217.        +337 to +356            Ignore these twenty bytes.
  218.        +357 to +378    String  Name of the first category.  Maximum 
  219.                                length of 20 bytes.  If the file has 
  220.                                only one category, the header record 
  221.                                will end here.
  222.        +379 to +400    String  Name of the second category, if any.  
  223.                                This area will not be on the header 
  224.                                record if there is only one category.
  225.        +401            22 Bytes  Additional 22 byte entries for all 
  226.                                remaining categories.  The size of 
  227.                                the header record depends on the 
  228.                                number of categories.  Space is not 
  229.                                maintained past the last category.
  230.  
  231. Report Records
  232.  
  233. Report records follow the header record.  One of the header record categories 
  234. tells you how many report records to expect.  The number will be from zero to 
  235. eight.  Each report record is 600 bytes, and contains:
  236.  
  237.        +000 to +019    String  Report name.  Maximum length of 19 characters.
  238.        +020 to +052    Bytes   Column width for up to 33 columns in 
  239.                                a tables-style report format.  Byte 
  240.                                +020 is for the leftmost column on a 
  241.                                tables-style report.  There can be 
  242.                                up to 30 categories from the file, 
  243.                                plus 3 more calculated columns.
  244.                                For labels-style report formats, the 
  245.                                value is a byte that has the 
  246.                                horizontal position of this 
  247.                                category, relative to the left 
  248.                                margin.
  249.        +053 to +055            Skip 3 bytes.
  250.        +056 to +088    Bytes   For tables-style:  Number of spaces 
  251.                                to be printed at the right of 
  252.                                justified columns.
  253.                                For labels-style:  Vertical position 
  254.                                on the report for each of up to 30 
  255.                                categories.  A value of 1 means that 
  256.                                category is on the first line of 
  257.                                labels-style report.
  258.        +089 to +091            Skip 3 bytes.
  259.        +092 to +124    Bytes   For up to 33 columns of tables-
  260.                                style:  Values from 1 to 30 refer to 
  261.                                which category name appears in this 
  262.                                column on the report.  Values of 
  263.                                $80, $81 and $82 are the three 
  264.                                calculated categories, from left to 
  265.                                right.
  266.                                For labels-style:  Same as tables-
  267.                                style, minus the calculated categories.
  268.        +125 to +127            Skip these three bytes.
  269.        +128 to +160    Bytes   For up to 33 columns of tables-
  270.                                style:  $99 means no foot totals, 0 
  271.                                through 4 means the number of 
  272.                                decimal places for a foot total.
  273.                                For labels-style:  For up to 30 
  274.                                categories on report, Boolean bytes 
  275.                                whether or not category names are to 
  276.                                be printed.
  277.        +161 to +163            Skip these three bytes.
  278.        +164 to +196    Bytes   For up to 33 columns of tables-
  279.                                style:  $99 means left justified, 0 
  280.                                through 4 means right justified with 
  281.                                0 to 4 decimal places.
  282.                                For up to 30 categories of labels-
  283.                                style:  Boolean bytes whether or not 
  284.                                to float (OA-J) this category up 
  285.                                against the category to its left.
  286.        +197 to +199            Skip three bytes.
  287.        +200            Byte    Number of categories on report.  
  288.                                Includes calculated categories, if any.
  289.        +201            Byte    Tables-style.  If there is at least 
  290.                                one calculated category, this 
  291.                                contains values from 1 to 33: which 
  292.                                column of the report.
  293.                                Labels-style:  Values from 3 to 21.  
  294.                                Position of the line on the screen 
  295.                                that says "Each record will print nn lines."
  296.        +202            Byte    Tables-style:  Same as +201, but for 
  297.                                the second calculated category, if any.
  298.                                Labels-style:  Unused.
  299.        +203            Byte    Tables-style:  Same as +201, but for 
  300.                                the third calculated category, if any.
  301.                                Labels-style:  Unused
  302.        +204            Byte    Tables-style only:  If there is a 
  303.                                group total column, this byte states 
  304.                                which of the category names is used 
  305.                                as a basis.  Values from 1 to 30.
  306.        +205            Byte    Platen width value, in 10ths of an 
  307.                                inch.  For example, a value of 8.0 
  308.                                inches entered by the user will show 
  309.                                as 80 or $50.
  310.        +206            Byte    Left margin value.  All inches 
  311.                                values are in 10ths.
  312.        +207            Byte    Right margin value.
  313.        +208            Byte    Characters per inch.
  314.        +209            Byte    Paper length value, in 10ths of an inch.
  315.        +210            Byte    Top margin value.
  316.        +211            Byte    Bottom margin value.
  317.        +212            Byte    Lines per inch.  6 or 8.
  318.        +213            Byte    Not relevant.  Probably always a "C."
  319.        +214            Byte    Type of report format.  
  320.                                H: tables-style, V: labels-style.
  321.        +215            Byte    Spacing:  S(ingle, D(ouble, or 
  322.                                T(riple.  Expect these three 
  323.                                letters, even in European versions.
  324.        +216            Byte    Print report header.  Boolean.
  325.        +217            Byte    Tables-style:  If user has specified 
  326.                                group totals, Boolean, just print 
  327.                                the group totals.
  328.        +218            Byte    Labels-style:  Boolean, omit the 
  329.                                line when all entries on the line 
  330.                                are blank.
  331.        +219            Byte    Labels-style:  Boolean, keep the 
  332.                                number of lines the same within each record.
  333.        +220 to +301    String  80-byte string.  Title line, if any.
  334.        +302 to +323    String  Tables-style.  20-byte string.  Name 
  335.                                of the first calculated category, if any.
  336.        +324 to +355    String  Tables-style.  30-byte string.  
  337.                                Calculation rules for first 
  338.                                calculated category, if any.
  339.        +356 to +409    String  Tables-style.  Name and rules for 
  340.                                second calculated category, if any.
  341.        +410 to +463    String  Tables-style.  Name and rules for 
  342.                                third calculated category, if any.
  343.        +464 to +477    String  If user has specified "Send special 
  344.                                codes to printer," this is a 13 byte 
  345.                                string containing those codes.
  346.        +478            Byte    Boolean:  Print a dash when an entry 
  347.                                is blank.
  348.        +479 to +592    Words & Strings
  349.                                Record selection rules.  Exact same
  350.                                format as described in the header record.
  351.        +593 to +599            Unused
  352.  
  353. Data Records
  354.  
  355. Data records follow the report records.  The first data record contains the 
  356. standard values.  Each following data record corresponds to one data base 
  357. record.
  358.  
  359. These records contain all of the categories within one stream of data.  The 
  360. category entries are in the same order that the category names appear in the 
  361. header record.
  362.  
  363. Bytes +0 and +1 are a word that contains a count of the number of bytes in the 
  364. remainder of the record.
  365.  
  366. Byte +2 of each record will always be a control byte.  Other control bytes 
  367. within each record define the contents of the record.  Control bytes may be:
  368.  
  369.        $01-$7F    This is a count of the number of following bytes 
  370.                   that are the contents of a category.
  371.        $81-$9E    This (minus $80) is a count of the number of 
  372.                   categories to be skipped.  For example, $82 
  373.                   means skip two categories.
  374.        $FF        This indicates the end of the record.
  375.  
  376. The information in individual categories may have some special coding so that 
  377. date and time entries can be arranged (sorted).
  378.  
  379. Date entries have the following format:
  380.  
  381.        +000            Byte    $C0 (192).  Identifies a date entry.
  382.        +001 to 002     Two bytes
  383.                                ASCII year code, like "84" ($38 $34).
  384.        +003            Byte    ASCII month code.  A means January, 
  385.                                L means December.
  386.        +004 to +005    Two bytes
  387.                                ASCII day of the month, like "31" ($33 $31).
  388.  
  389. Time entries have the following format:
  390.  
  391.        +000            Byte    $D4 (212).  Identifies a time entry.
  392.        +001            Byte    ASCII hour code.  A means 00 (the 
  393.                                hour after midnight).  X means 23, 
  394.                                the hour before midnight.
  395.        +002 to +003    Two bytes
  396.                                ASCII minute code.  Values from 00 to 59.
  397.  
  398.  
  399. File Tags
  400.  
  401. All AppleWorks files normally end with two bytes of $FF; tags are 
  402. anything after that.  Although File Tags were primarily designed by 
  403. Beagle Bros, they can be used by any application that needs to create or 
  404. modify an AppleWorks 3.0 file.
  405.  
  406. Because versions of AppleWorks before 3.0 stop at the double $FF, they 
  407. simply ignore tags.
  408.  
  409. The File Tag structure is as follows:
  410.  
  411.        +000            Byte    Tag ID.  Should be $FF.
  412.        +001            Byte    2nd ID byte.  These values will be 
  413.                                defined and arbitrated by Beagle 
  414.                                Bros Software.   Beagle may be 
  415.                                reached at:
  416.  
  417.                                        Beagle Bros Inc
  418.                                        6215 Ferris Square, #100
  419.                                        San Diego, CA  92121
  420.  
  421.        +002 to +003    Word    Data length.  If this is the last 
  422.                                tag on the file, the low byte (+002) 
  423.                                will be a count of the tags in this 
  424.                                file, and the high byte (+003) will 
  425.                                be $FF.
  426.        +004 to nnn    Bytes    Actual tag data, immediately 
  427.                                followed by the next four-byte tag 
  428.                                ID.  These bytes do not exist for 
  429.                                the last tag.
  430.  
  431. There is a maximum of 64 tags per file.  Each tag may be no larger than 
  432. 2K.
  433.  
  434. _____________________________________________________________________________
  435. AppleWorks is a registered trademark of Apple Computer, Inc. licensed to 
  436. Claris Corporation.
  437.  
  438.